package com.friddle.Download.Selumin;

import com.friddle.Download.PageGet.AntiStrategy;
import com.friddle.Download.PageGet.GetConfigure;
import com.friddle.Download.PageGet.PageResult;
import com.thoughtworks.selenium.DefaultSelenium;
import org.openqa.selenium.By;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;

import java.net.MalformedURLException;
import java.net.URL;

/**
 * Created by friddle on 15/3/10.
 */
public class SeleniumDownload {
    public static void main(String[] args) throws MalformedURLException {
        DesiredCapabilities dr=null;
        dr=DesiredCapabilities.firefox();
        dr.setBrowserName("chrome");
        RemoteWebDriver driver=new RemoteWebDriver(new URL("http://192.168.59.103:4444/wd/hub"), dr);
        driver.navigate().to("http://www.baidu.com");
        driver.close();
    }

    public static boolean initSelenium(String driveLocation)
    {
       // DefaultSelenium selenium = new DefaultSelenium(host,port,browserType,url);
        return true;
    }

    public PageResult getPageContent(String url,GetConfigure configure,AntiStrategy strategy)
    {
        return null;
    }


}
